//========================================================================================
//  
//  $File: $
//  
//  Owner: Toan Nguyen
//  
//  $Author: $
//  
//  $DateTime: $
//  
//  $Revision: $
//  
//  $Change: $
//  
//  Copyright 1997-2008 Adobe Systems Incorporated. All rights reserved.
//  
//  NOTICE:  Adobe permits you to use, modify, and distribute this file in accordance 
//  with the terms of the Adobe license agreement accompanying it.  If you have received
//  this file from a source other than Adobe, then your use, modification, or 
//  distribution of it requires the prior written permission of Adobe.
//  
//========================================================================================
#ifndef __PnlTrvFileNodeID__
#define __PnlTrvFileNodeID__

#include "NodeID.h"
#include "IPMStream.h"
#include "AMPID.h"

#include <iostream>
using namespace std;

/** Represents a node in some notional file system; this could be a platform file
	system, or a file within a repository such as Perforce.
	Overriding this class lets us populate the tree with our own data type that
	represents whatever we want on each node.

	
	@ingroup paneltreeview
*/
class AMPIssuesFileNodeID : public NodeIDClass
{
	public:
		enum { kNodeType = kAMPIssuesTreeViewWidgetBoss }; 


		/**	Factory method to create 
		new object of this class
			@return   new instance of this class 
		 */
		static	NodeID_rv Create() { return new AMPIssuesFileNodeID(); }

		/**	Factory method to create new object of this class
			@param path [IN] specifies initial path
			@return  new instance of this class
		 */
		static	NodeID_rv Create(const PMString& path)  
			{ return new AMPIssuesFileNodeID(path); }
	
		static NodeID_rv Create(const PMString& path, const PMString& displayName) 
			{
				////cout << "create AMPIssueFileNode path and name " << path.GrabCString() << ";" << displayName.GrabCString() << endl;
			return new AMPIssuesFileNodeID(path, displayName); }
	
		static NodeID_rv Create(const PMString& path, const PMString& displayName, const PMString& imgPath) 
			{ return new AMPIssuesFileNodeID(path, displayName, imgPath); }
	
		static NodeID_rv Create(const PMString& path, const PMString& displayName, const PMString& imgPath, const int dataType) 
			{  return new AMPIssuesFileNodeID(path, displayName, imgPath, dataType); }

		static NodeID_rv Create(const PMString& path, const PMString& displayName, const PMString& imgPath, const int dataType, const int dataChecked)
			{  ////cout << "create dataChecked: " << dataChecked << endl;
				return new AMPIssuesFileNodeID(path, displayName, imgPath, dataType, dataChecked);
			}
		static NodeID_rv Create(const PMString& path, const PMString& displayName, const PMString& imgPath, const int dataType, const int dataChecked, const int num)
			{  ////cout << "create dataChecked: " << dataChecked << endl;
				return new AMPIssuesFileNodeID(path, displayName, imgPath, dataType, dataChecked, num);
			}
	
		/**	Destructor
		 */
		virtual ~AMPIssuesFileNodeID() {}
		

		/**	@return type of this node
		 */
		virtual	NodeType GetNodeType() const { return kNodeType; } 

		/**	Comparator function
			@param NodeID [IN] specifies the node that we should compare against
			@return  Comparison results
		 */
		virtual int32 Compare(const NodeIDClass* NodeID) const;

		/**	Create a copy of this
			@return  
		 */
		virtual NodeIDClass* Clone() const;

		/**	Read this from the given stream
			@param stream [IN] specified stream
			@return  
		 */
		virtual void Read(IPMStream* stream);

		/**	Write this to the given stream
			@param [OUT] stream 
			@return  
		 */
		virtual void Write(IPMStream* stream) const;

		/**	Accessor for the path associated with this node
			@return const PMString& 
		 */
		const PMString& GetPath() const { return fPath; }
	
		const PMString& GetDisplayName() const { return fDisplayName; }
	
		const PMString& GetImgPath() const {
			////cout << "AMPIssuesFileNodeID GetImgPath: " << fImgPath.GrabCString() << endl;
			return fImgPath; }
	
		const int GetDataType() const { return iDataType; }
	
		const int GetDataChecked() const { ////cout << "AMPIssueFileNodeID GetDataChecked:" << IsDataChecked << endl;
			return IsDataChecked; }
	
		const int GetNumber() const { return iNumber; }

	private:
		// Note we're keeping the destructor private to force use of the factory methods
		AMPIssuesFileNodeID() {}

		AMPIssuesFileNodeID(PMString path):fPath(path) {}
	
		AMPIssuesFileNodeID(PMString path, PMString displayName):fPath(path),fDisplayName(displayName) {}
		
		AMPIssuesFileNodeID(PMString path, PMString displayName, PMString imgPath):fPath(path),fDisplayName(displayName),fImgPath(imgPath) {}
	
		AMPIssuesFileNodeID(PMString path, PMString displayName, PMString imgPath, int dataType):fPath(path),fDisplayName(displayName),fImgPath(imgPath),iDataType(dataType) {}
	
		AMPIssuesFileNodeID(PMString path, PMString displayName, PMString imgPath, int dataType, int dataChecked):fPath(path),fDisplayName(displayName),fImgPath(imgPath),iDataType(dataType),IsDataChecked(dataChecked) {}

		AMPIssuesFileNodeID(PMString path, PMString displayName, PMString imgPath, int dataType, int dataChecked, int num):fPath(path),fDisplayName(displayName),fImgPath(imgPath),iDataType(dataType),IsDataChecked(dataChecked),iNumber(num) {}

		PMString	fPath;			//
		PMString	fDisplayName;	// PAGE
		PMString	fImgPath;		// audiencemedia.com
		int			iDataType;
		int			IsDataChecked;
		int			iNumber;
};

#endif // __PnlTrvFileNodeID__


